<?php
## include required files
/*******************************/ 
require_once '../../includefiles.php';
include_once("../../model/city.php");
/*******************************/
## Create Objects
/*******************************/
$cityObj = new Model_City();

if ($_GET['cityname']){
	$cityname = $_GET['cityname']; 
}

if ($_GET['id']){
	$id = $_GET['id'];
}

if($cityname){
// this function check username Exit ot not
	 $result = $cityObj->checkCityName(strtoupper(trim($cityname)), $id); 
	if(count($result) > 0){	
		if(strtoupper(trim($result['city_name'])) == strtoupper(trim($cityname))){  
			echo 'false';
		}
	}
	else{
		echo "true";	
	}
}
unset($cityObj);
?>


